unit DMUnit;

interface

uses
  SysUtils, Classes, DB, ADODB;

type
  TDM = class(TDataModule)
    Conn: TADOConnection;
    procedure DataModuleCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  DM: TDM;

implementation

{$R *.dfm}

procedure TDM.DataModuleCreate(Sender: TObject);
begin
  if Conn.Connected then Conn.Close;
  conn.ConnectionString := 'Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;' +
    'Jet OLEDB:Database Password= ; Data Source=' +
    ExtractFilePath(ParamStr(0)) + 'data.mdb;' +
    ';Persist Security Info=False';
  conn.Open;
end;

end.
